package com.yunshang.shoppingmall.service;

import com.yunshang.shoppingmall.entity.ActiveProduct;
import com.yunshang.shoppingmall.entity.OrderDetails;
import com.yunshang.shoppingmall.entity.OrderDetailsProduct;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderDetailsService {
    OrderDetails selectOrderDetailsByOrderNo(@Param("orderNo") String orderNo,@Param("userId") String userId);
    List<OrderDetailsProduct> selectOrderDetailsProductByOrderNo(String orderNo);
    List<OrderDetailsProduct> selectProductDetailsByCartID(@Param("carts") List<String> carts);
    List<OrderDetailsProduct> selectCartByUserID(int userId);//通过用户Id查询所有购物车
    List<OrderDetailsProduct> selectCart(@Param("userId") String userId, @Param("cartsList") List<String> cartsList);
    OrderDetailsProduct selectCartOne(@Param("userId") int userId,@Param("cartId") int cartId);

    //根据用户查询活动商品购买数量
    List<OrderDetailsProduct> selectActiveProductCount(ActiveProduct activeProduct);
    //查询活动商品的销售总数量
    int selectActiveProductTotalCount(ActiveProduct activeProduct);
}
